<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>班级&学生管理系统</title>
    <link rel="stylesheet" href="./Public/bootstrap-3.3.0-dist/dist/css/bootstrap.min.css">
    <style>
        .box {
            width: 60%;
            margin: 40px auto;
        }
    </style>
</head>
<body>
<div class="box">
    <div class="panel panel-default">
        <div class="panel-heading">班级管理</div>
        <div class="panel-body">
            <table class="table table-striped">
                <tr>
                    <th>班级编号</th>
                    <th>班级名称</th>
                    <th>操作</th>
                </tr>
                <?php foreach($allClass as $v){?>
                <tr>
                    <td><?php echo $v['cid']?></td>
                    <td><?php echo $v['cname']?></td>
                    <td>
                        <a href="index.php?c=student&a=index&cid=<?php echo $v['cid']?>" class="btn btn-default btn-xs">查看学生</a>
                        <a href="index.php?c=class&a=editClass&cid=<?php echo $v['cid']?>" class="btn btn-primary btn-xs">编辑班级</a>
                        <a href="javascript:if(confirm('确定删除吗？'))location.href='index.php?c=class&a=deleteClass&cid=<?php echo $v['cid']?>';" class="btn btn-danger btn-xs">删除班级</a>
                    </td>
                </tr>
                <?php }?>
            </table>
            <a href="index.php?c=class&a=addClass" type="button" class="btn btn-success" data-toggle="modal" data-target=".c75modal">添加班级</a>
        </div>
    </div>

</div>
<script src="./Public/jquery.min.js"></script>
<script src="./Public/bootstrap-3.3.0-dist/dist/js/bootstrap.min.js"></script>


<form class="form-horizontal" role="form">
<div class="modal fade c75modal">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                <h4 class="modal-title">添加班级</h4>
            </div>
            <div class="modal-body">

                    <div class="form-group">
                        <label for="inputEmail3" class="col-sm-2 control-label">班级名称</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="inputEmail3" placeholder="">
                        </div>
                    </div>

            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="submit" class="btn btn-primary">确定</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</form>


</body>
</html>